package com.example.base.net

import com.example.base.entity.GoodsEntity
import com.example.base.entity.IndexEntity
import com.example.base.mvvm.BaseModel
import retrofit2.http.GET
import retrofit2.http.Path
import retrofit2.http.Query

interface ApiServer {
    @GET(Cons.INDEX_URL)
    suspend fun index():BaseModel<IndexEntity>
    @GET(Cons.INDEX_GOODS_URL)
    suspend fun indexGoods(@Path("type")type:Int,@Query("limit")limit:Int,@Query("page")page:Int):BaseModel<GoodsEntity>
    @GET(Cons.SEARCH_URL)
    suspend fun search(@Query("keyword")keyword:String,@Query("limit")limit:Int,@Query("page")page:Int):BaseModel<GoodsEntity>
}